classdef ParamsSingleton < Singleton
    %PARAMSSINGLETON Summary of this class goes here
    %   Detailed explanation goes here
    
    properties(GetAccess=public)
        simulation_time_in_msec = 400;
        clock_tick_delta_in_msec = 100;
        
        use_romer = true;
        
        %this parameters defines how long the UniformLinkRateGenerator will generate the same link rate
        uniform_link_rate_generator_stability_period_in_msec = 100;
        
        % Pareto parameters:
        web_browsing_pareto_on_alpha = 80;
        web_browsing_pareto_off_alpha = 5;
        web_browsing_pareto_on_mu = 5;
        web_browsing_pareto_off_mu = 10;
        
        file_download_pareto_on_alpha = 800;
        file_download_pareto_off_alpha = 500;
        file_download_pareto_on_mu = 1500;
        file_download_pareto_off_mu = 1000;
        
        max_number_of_packets_per_node_allowed_per_tick = 2000;
        
        %ROMER parameters
        ROMER_threshold_power = 2;
        romer_alpha = 1;
        
        %forwarding
        should_use_constant_forward_probability = true;
        constant_forward_probability = 1.0;
        should_limit_number_of_forward_copies = false;
        max_number_of_forwarding_copies = 4;
        should_romer_use_node_cache_for_packet_ids = true;
        
        % general parameters
        should_print = true;
        should_print_to_screen = false;
        output_file = 'log1.txt';
        statistics_output_file = 'statistics.txt';
        
        number_of_packets_to_deposit_in_single_node_simulation = 1;
        single_packet_size_in_single_node_simulation_in_bytes = 1000;
        main_axes;
        
        should_disable_all_traffic_generators = false;
        
        % router types
        router_type_DIJKSTRA = 0;
        router_type_ROMER = 1;
        
        %%%%%%%%%%%%%%%%%%%%%%%%%%
        % <GUIParameters>
        
        link_loss_rate_in_precentage = 2;
        adapter_max_queue_size_in_bytes = 512*1024*1024;
        
        % Traffic parameters:
        file_download_precentage = 55;
        web_browsing_precentage = 35;
        voip_precentage = 10;
        
        file_download_packet_size_in_bytes = 1500;
        web_browsing_packet_size_in_bytes = 1200;
        voip_packet_size_in_bytes = 100;
        
        file_download_data_rate_in_Kbps = 2 * 1024;
        web_browsing_data_rate_in_Kbps = 400;
        voip_data_rate_in_Kbps = 64;
        
        % </GUIParameters>
        %%%%%%%%%%%%%%%%%%%%%%%%%%
    end
    
    methods(Static)
      function obj = instance(should_reinit)
         persistent unique_instance;
         should_reinit = (nargin>0);
         if isempty(unique_instance) || (should_reinit==true)
            unique_instance = ParamsSingleton();
         end
         obj = unique_instance;
      end
   end
    
end